3.11.95 \(\int x^3 (A+B x) (a+b x+c x^2)^p \, dx\) [1095]

Optimal. Leaf size=442 \[ -\frac {(b B (4+p)-A c (5+2 p)) x^2 \left (a+b x+c x^2\right )^{1+p}}{2 c^2 (2+p) (5+2 p)}+\frac {B x^3 \left (a+b x+c x^2\right )^{1+p}}{c (5+2 p)}+\frac {\left (2 a c (3+2 p) (b B (4+p)-A c (5+2 p))+b (2+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right )-2 c (1+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right ) x\right ) \left (a+b x+c x^2\right )^{1+p}}{4 c^4 (1+p) (2+p) (3+2 p) (5+2 p)}-\frac {2^{-1+p} \left (12 a^2 B c^2-12 a b^2 B c (3+p)+6 a A b c^2 (5+2 p)+b^4 B \left (12+7 p+p^2\right )-A b^3 c \left (15+11 p+2 p^2\right )\right ) \left (-\frac {b-\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-1-p} \left (a+b x+c x^2\right )^{1+p} \, _2F_1\left (-p,1+p;2+p;\frac {b+\sqrt {b^2-4 a c}+2 c x}{2 \sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c} (1+p) (3+2 p) (5+2 p)} \]

[Out]

-1/2*(b*B*(4+p)-A*c*(5+2*p))*x^2*(c*x^2+b*x+a)^(1+p)/c^2/(2+p)/(5+2*p)+B*x^3*(c*x^2+b*x+a)^(1+p)/c/(5+2*p)+1/4
*(2*a*c*(3+2*p)*(b*B*(4+p)-A*c*(5+2*p))+b*(2+p)*(6*a*B*c*(2+p)-b^2*B*(p^2+7*p+12)+A*b*c*(2*p^2+11*p+15))-2*c*(
1+p)*(6*a*B*c*(2+p)-b^2*B*(p^2+7*p+12)+A*b*c*(2*p^2+11*p+15))*x)*(c*x^2+b*x+a)^(1+p)/c^4/(4*p^4+28*p^3+71*p^2+
77*p+30)-2^(-1+p)*(12*a^2*B*c^2-12*a*b^2*B*c*(3+p)+6*a*A*b*c^2*(5+2*p)+b^4*B*(p^2+7*p+12)-A*b^3*c*(2*p^2+11*p+
15))*(c*x^2+b*x+a)^(1+p)*hypergeom([-p, 1+p],[2+p],1/2*(b+2*c*x+(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^(1/2))*((-b-2
*c*x+(-4*a*c+b^2)^(1/2))/(-4*a*c+b^2)^(1/2))^(-1-p)/c^4/(1+p)/(3+2*p)/(5+2*p)/(-4*a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.50, antiderivative size = 442, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {846, 793, 638} \begin {gather*} -\frac {2^{p-1} \left (a+b x+c x^2\right )^{p+1} \left (-\frac {-\sqrt {b^2-4 a c}+b+2 c x}{\sqrt {b^2-4 a c}}\right )^{-p-1} \left (12 a^2 B c^2+6 a A b c^2 (2 p+5)-12 a b^2 B c (p+3)-A b^3 c \left (2 p^2+11 p+15\right )+b^4 B \left (p^2+7 p+12\right )\right ) \, _2F_1\left (-p,p+1;p+2;\frac {b+2 c x+\sqrt {b^2-4 a c}}{2 \sqrt {b^2-4 a c}}\right )}{c^4 (p+1) (2 p+3) (2 p+5) \sqrt {b^2-4 a c}}+\frac {\left (a+b x+c x^2\right )^{p+1} \left (-2 c (p+1) x \left (6 a B c (p+2)+A b c \left (2 p^2+11 p+15\right )+b^2 (-B) \left (p^2+7 p+12\right )\right )+b (p+2) \left (6 a B c (p+2)+A b c \left (2 p^2+11 p+15\right )+b^2 (-B) \left (p^2+7 p+12\right )\right )+2 a c (2 p+3) (b B (p+4)-A c (2 p+5))\right )}{4 c^4 (p+1) (p+2) (2 p+3) (2 p+5)}-\frac {x^2 \left (a+b x+c x^2\right )^{p+1} (b B (p+4)-A c (2 p+5))}{2 c^2 (p+2) (2 p+5)}+\frac {B x^3 \left (a+b x+c x^2\right )^{p+1}}{c (2 p+5)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^3*(A + B*x)*(a + b*x + c*x^2)^p,x]

[Out]

-1/2*((b*B*(4 + p) - A*c*(5 + 2*p))*x^2*(a + b*x + c*x^2)^(1 + p))/(c^2*(2 + p)*(5 + 2*p)) + (B*x^3*(a + b*x +
 c*x^2)^(1 + p))/(c*(5 + 2*p)) + ((2*a*c*(3 + 2*p)*(b*B*(4 + p) - A*c*(5 + 2*p)) + b*(2 + p)*(6*a*B*c*(2 + p)
- b^2*B*(12 + 7*p + p^2) + A*b*c*(15 + 11*p + 2*p^2)) - 2*c*(1 + p)*(6*a*B*c*(2 + p) - b^2*B*(12 + 7*p + p^2)
+ A*b*c*(15 + 11*p + 2*p^2))*x)*(a + b*x + c*x^2)^(1 + p))/(4*c^4*(1 + p)*(2 + p)*(3 + 2*p)*(5 + 2*p)) - (2^(-
1 + p)*(12*a^2*B*c^2 - 12*a*b^2*B*c*(3 + p) + 6*a*A*b*c^2*(5 + 2*p) + b^4*B*(12 + 7*p + p^2) - A*b^3*c*(15 + 1
1*p + 2*p^2))*(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c]))^(-1 - p)*(a + b*x + c*x^2)^(1 + p)*Hyperg
eometric2F1[-p, 1 + p, 2 + p, (b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(2*Sqrt[b^2 - 4*a*c])])/(c^4*Sqrt[b^2 - 4*a*c]*(
1 + p)*(3 + 2*p)*(5 + 2*p))

Rule 638

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(-(a + b*x + c*
x^2)^(p + 1)/(q*(p + 1)*((q - b - 2*c*x)/(2*q))^(p + 1)))*Hypergeometric2F1[-p, p + 1, p + 2, (b + q + 2*c*x)/
(2*q)], x]] /; FreeQ[{a, b, c, p}, x] && NeQ[b^2 - 4*a*c, 0] &&  !IntegerQ[4*p]

Rule 793

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-(b
*e*g*(p + 2) - c*(e*f + d*g)*(2*p + 3) - 2*c*e*g*(p + 1)*x))*((a + b*x + c*x^2)^(p + 1)/(2*c^2*(p + 1)*(2*p +
3))), x] + Dist[(b^2*e*g*(p + 2) - 2*a*c*e*g + c*(2*c*d*f - b*(e*f + d*g))*(2*p + 3))/(2*c^2*(2*p + 3)), Int[(
a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b^2 - 4*a*c, 0] &&  !LeQ[p, -1]

Rule 846

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Sim
p[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 1)/(c*(m + 2*p + 2))), x] + Dist[1/(c*(m + 2*p + 2)), Int[(d + e*x)^(m
 - 1)*(a + b*x + c*x^2)^p*Simp[m*(c*d*f - a*e*g) + d*(2*c*f - b*g)*(p + 1) + (m*(c*e*f + c*d*g - b*e*g) + e*(p
 + 1)*(2*c*f - b*g))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
 b*d*e + a*e^2, 0] && GtQ[m, 0] && NeQ[m + 2*p + 2, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])
&&  !(IGtQ[m, 0] && EqQ[f, 0])

Rubi steps

\begin {align*} \int x^3 (A+B x) \left (a+b x+c x^2\right )^p \, dx &=\frac {B x^3 \left (a+b x+c x^2\right )^{1+p}}{c (5+2 p)}+\frac {\int x^2 (-3 a B-(b B (4+p)-A c (5+2 p)) x) \left (a+b x+c x^2\right )^p \, dx}{c (5+2 p)}\\ &=-\frac {(b B (4+p)-A c (5+2 p)) x^2 \left (a+b x+c x^2\right )^{1+p}}{2 c^2 (2+p) (5+2 p)}+\frac {B x^3 \left (a+b x+c x^2\right )^{1+p}}{c (5+2 p)}+\frac {\int x \left (2 a (b B (4+p)-A c (5+2 p))-\left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right ) x\right ) \left (a+b x+c x^2\right )^p \, dx}{2 c^2 (2+p) (5+2 p)}\\ &=-\frac {(b B (4+p)-A c (5+2 p)) x^2 \left (a+b x+c x^2\right )^{1+p}}{2 c^2 (2+p) (5+2 p)}+\frac {B x^3 \left (a+b x+c x^2\right )^{1+p}}{c (5+2 p)}+\frac {\left (2 a c (3+2 p) (b B (4+p)-A c (5+2 p))+b (2+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right )-2 c (1+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right ) x\right ) \left (a+b x+c x^2\right )^{1+p}}{4 c^4 (1+p) (2+p) (3+2 p) (5+2 p)}+\frac {\left (12 a^2 B c^2-12 a b^2 B c (3+p)+6 a A b c^2 (5+2 p)+b^4 B \left (12+7 p+p^2\right )-A b^3 c \left (15+11 p+2 p^2\right )\right ) \int \left (a+b x+c x^2\right )^p \, dx}{4 c^4 (3+2 p) (5+2 p)}\\ &=-\frac {(b B (4+p)-A c (5+2 p)) x^2 \left (a+b x+c x^2\right )^{1+p}}{2 c^2 (2+p) (5+2 p)}+\frac {B x^3 \left (a+b x+c x^2\right )^{1+p}}{c (5+2 p)}+\frac {\left (2 a c (3+2 p) (b B (4+p)-A c (5+2 p))+b (2+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right )-2 c (1+p) \left (6 a B c (2+p)-b^2 B \left (12+7 p+p^2\right )+A b c \left (15+11 p+2 p^2\right )\right ) x\right ) \left (a+b x+c x^2\right )^{1+p}}{4 c^4 (1+p) (2+p) (3+2 p) (5+2 p)}-\frac {2^{-1+p} \left (12 a^2 B c^2-12 a b^2 B c (3+p)+6 a A b c^2 (5+2 p)+b^4 B \left (12+7 p+p^2\right )-A b^3 c \left (15+11 p+2 p^2\right )\right ) \left (-\frac {b-\sqrt {b^2-4 a c}+2 c x}{\sqrt {b^2-4 a c}}\right )^{-1-p} \left (a+b x+c x^2\right )^{1+p} \, _2F_1\left (-p,1+p;2+p;\frac {b+\sqrt {b^2-4 a c}+2 c x}{2 \sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c} (1+p) (3+2 p) (5+2 p)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
time = 0.55, size = 210, normalized size = 0.48 \begin {gather*} \frac {1}{20} x^4 \left (\frac {b-\sqrt {b^2-4 a c}+2 c x}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x}{b+\sqrt {b^2-4 a c}}\right )^{-p} (a+x (b+c x))^p \left (5 A F_1\left (4;-p,-p;5;-\frac {2 c x}{b+\sqrt {b^2-4 a c}},\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )+4 B x F_1\left (5;-p,-p;6;-\frac {2 c x}{b+\sqrt {b^2-4 a c}},\frac {2 c x}{-b+\sqrt {b^2-4 a c}}\right )\right ) \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[x^3*(A + B*x)*(a + b*x + c*x^2)^p,x]

[Out]

(x^4*(a + x*(b + c*x))^p*(5*A*AppellF1[4, -p, -p, 5, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2
- 4*a*c])] + 4*B*x*AppellF1[5, -p, -p, 6, (-2*c*x)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])])
)/(20*((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(b - Sqrt[b^2 - 4*a*c]))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(b + Sqrt[b
^2 - 4*a*c]))^p)

________________________________________________________________________________________

Maple [F]
time = 0.45, size = 0, normalized size = 0.00 \[\int x^{3} \left (B x +A \right ) \left (c \,x^{2}+b x +a \right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x)

[Out]

int(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x, algorithm="maxima")

[Out]

integrate((B*x + A)*(c*x^2 + b*x + a)^p*x^3, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x, algorithm="fricas")

[Out]

integral((B*x^4 + A*x^3)*(c*x^2 + b*x + a)^p, x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(B*x+A)*(c*x**2+b*x+a)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(B*x+A)*(c*x^2+b*x+a)^p,x, algorithm="giac")

[Out]

integrate((B*x + A)*(c*x^2 + b*x + a)^p*x^3, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int x^3\,\left (A+B\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^p \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(A + B*x)*(a + b*x + c*x^2)^p,x)

[Out]

int(x^3*(A + B*x)*(a + b*x + c*x^2)^p, x)

________________________________________________________________________________________